<template>
  <div class="app-container">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="商品管理" name="1">
        <list ref="listInfo"
      /></el-tab-pane>
      <el-tab-pane label="订单管理" name="2">
        <order ref="orderInfo"
      /></el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import list from "@/views/shop/list.vue";
import order from "@/views/shop/order.vue";
export default {
  components: { list, order },
  data() {
    return {
      activeName: "1",
    };
  },

  methods: {
    handleClick(e) {
      if (e.name === "1") {
        this.$refs.listInfo.getList();
      } else if (e.name === "2") {
        this.$refs.orderInfo.getList();
      }
    },
  },
};
</script>
  